home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 008a / paragen2.zip / DEMOINV.CPP < prev    next >
C/C++ Source or Header  |  1991-03-28  |  789b  |  37 lines

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4. #include "invoice.h"
  5. #include "pxengine.h"
  6.  
  7. void main(void)
  8. {
  9.     static INVOICETABLEENTRY Demo;
  10.  
  11.     if (PXInit())
  12.         {
  13.         printf("Unable to initialize PARADOX Engine\n");
  14.         exit(1);
  15.         }
  16.  
  17.     if ((INVOICERet = INVOICETblOpen(NULL)) != PXSUCCESS)
  18.         {
  19.         printf("Unable to open INVOICE table\n");
  20.         exit(2);
  21.         }
  22.  
  23.     strcpy(Demo.ShipVia,"UPS 2 Day");
  24.  
  25.     INVOICESrchFld(SEARCHFIRST,"Ship Via",&Demo);
  26.     do
  27.         {
  28.         printf("Invoice [%10.0f]  Method [%s]\n",Demo.InvoiceNumber,Demo.ShipVia);
  29.         } while (!INVOICESrchFld(SEARCHNEXT,"Ship Via",&Demo));
  30.     
  31.     if ((INVOICERet = INVOICETblClose()) != PXSUCCESS)
  32.         printf("Unable to close INVOICE table\n");
  33.  
  34.     if (PXExit())
  35.         printf("Unable to close down PARADOX Engine\n");
  36. }
  37.